package com.sd.struts;

import javax.servlet.http.*;
import org.apache.struts.action.*;

public class MyRegAction extends Action{
	
	public ActionForward execute(ActionMapping am,ActionForm af,HttpServletRequest req,HttpServletResponse res){
		
		
		MyRegForm mrf=(MyRegForm)af;
		String uname=mrf.getUname();
		String upass=mrf.getUpass();
		String addr=mrf.getAddr();
		String email=mrf.getEmail();
		System.out.println("USER NAME="+mrf.getUname());
		MyRegModel model=new MyRegModel();	
		String result=model.register(uname,upass,addr,email);
		ActionForward forward=am.findForward(result);
		return forward;
	
	}
}
